<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #dv {
            width: 200px;
            height: 200px;
            margin: 0 auto;
        }

        #dv #p1 {
            width: 100%;
            height: 20px;
            font-size: 10px;
        }

        #dv #p2 {
            display: none;
        }
    </style>
</head>

<body>

    <div id="dv">
        <p id="p1"> <input type="checkbox" name="" id="">两周内自动登录</p>
        <p id="p2">测试</p>
    </div>

</body>
<script>
    var op1 = document.getElementById("p1")
    var op2 = document.getElementById("p2")
    op1.onmouseover = function () {
        console.log("移入");
        op2.style.display = 'block'
    };
    op1.onmouseout = function () {
        console.log("移出");
        op2.style.display = 'none'
    };
</script>

</html>